function oneF(callback) {
    let flag = false
    return function () {
        if (!flag) {
            callback()
            flag = true
        }
    }
}

function hello() {
    console.log("hello")
}
const h = oneF(hello)

h()
h()
